
<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <title>1.6.&nbsp;Debian GNU/Linux 上的 Python </title>
      <link rel="stylesheet" href="../diveintopython.css" type="text/css">
      <link rev="made" href="mailto:f8dy@diveintopython.org">
      <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
      <meta name="keywords" content="Python, Dive Into Python, tutorial, object-oriented, programming, documentation, book, free">
      <meta name="description" content="Python from novice to pro">
      <link rel="home" href="../toc/index.html" title="Dive Into Python">
      <link rel="up" href="index.html" title="第&nbsp;1&nbsp;章&nbsp;安装 Python">
      <link rel="previous" href="redhat.html" title="1.5.&nbsp;RedHat Linux 上的 Python ">
      <link rel="next" href="source.html" title="1.7.&nbsp;从源代码安装 Python ">
   </head>
   <body>
      <table id="Header" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
         <tr>
            <td id="breadcrumb" colspan="5" align="left" valign="top">导航：<a href="../index.html">起始页</a>&nbsp;&gt;&nbsp;<a href="../toc/index.html">Dive Into Python</a>&nbsp;&gt;&nbsp;<a href="index.html">安装 Python</a>&nbsp;&gt;&nbsp;<span class="thispage">Debian GNU/Linux 上的 Python </span></td>
            <td id="navigation" align="right" valign="top">&nbsp;&nbsp;&nbsp;<a href="redhat.html" title="上一页: “RedHat Linux 上的 Python ”">&lt;&lt;</a>&nbsp;&nbsp;&nbsp;<a href="source.html" title="下一页: “从源代码安装 Python ”">&gt;&gt;</a></td>
         </tr>
         <tr>
            <td colspan="3" id="logocontainer">
               <h1 id="logo"><a href="../index.html" accesskey="1">深入 Python :Dive Into Python 中文版</a></h1>
               <p id="tagline">Python 从新手到专家 [Dip_5.4b_CPyUG_Release]</p>
            </td>
            <td colspan="3" align="right">
               <form id="search" method="GET" action="http://www.google.com/custom">
                  <p><label for="q" accesskey="4">Find:&nbsp;</label><input type="text" id="q" name="q" size="20" maxlength="255" value=""> <input type="submit" value="搜索"><input type="hidden" name="domains" value="woodpecker.org.cn/diveintopython"><input type="hidden" name="sitesearch" value="www.woodpecker.org.cn/diveintopython"></p>
               </form>
            </td>
         </tr>
      </table>
      <!--#include virtual="/inc/ads" -->
      <div class="section" lang="zh_cn">
         <div class="titlepage">
            <div>
               <div>
                  <h2 class="title"><a name="install.debian"></a>1.6.&nbsp;Debian <span class="acronym">GNU</span>/Linux 上的 <span class="application">Python</span> 
                  </h2>
               </div>
            </div>
            <div></div>
         </div>
         <div class="abstract">
            <p>如果您运行在 Debian <span class="acronym">GNU</span>/Linux 上，安装 <span class="application">Python</span> 需要使用 <span><b class="command">apt</b></span> 命令。
            </p>
         </div>
         <div class="example"><a name="d0e3765"></a><h3 class="title">例&nbsp;1.3.&nbsp;在 Debian <span class="acronym">GNU</span>/Linux 上安装
            </h3><pre class="screen">
<tt class="prompt">localhost:~$ </tt><span class="userinput">su -</span>
<tt class="prompt">Password: </tt><span class="userinput">[enter your root password]</span>
<tt class="prompt">localhost:~# </tt><span class="userinput">apt-get install python</span>
<span class="computeroutput">Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  python2.3
Suggested packages:
  python-tk python2.3-doc
The following NEW packages will be installed:
  python python2.3
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 0B/2880kB of archives.
After unpacking 9351kB of additional disk space will be used.</span>
<tt class="prompt">Do you want to continue? [Y/n] </tt><span class="userinput">Y</span>
<span class="computeroutput">Selecting previously deselected package python2.3.
(Reading database ... 22848 files and directories currently installed.)
Unpacking python2.3 (from .../python2.3_2.3.1-1_i386.deb) ...
Selecting previously deselected package python.
Unpacking python (from .../python_2.3.1-1_all.deb) ...
Setting up python (2.3.1-1) ...
Setting up python2.3 (2.3.1-1) ...
Compiling python modules in /usr/lib/python2.3 ...
Compiling optimized python modules in /usr/lib/python2.3 ...</span>
<tt class="prompt">localhost:~# </tt><span class="userinput">exit</span>
<span class="computeroutput">logout</span>
<tt class="prompt">localhost:~$ </tt><span class="userinput">python</span>
<span class="computeroutput">Python 2.3.1 (#2, Sep 24 2003, 11:39:14)
[GCC 3.3.2 20030908 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.</span>
<tt class="prompt">&gt;&gt;&gt; </tt><span class="userinput">[press Ctrl+D to exit]</span>
</pre></div>
      </div>
      <table class="Footer" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
         <tr>
            <td width="35%" align="left"><br><a class="NavigationArrow" href="redhat.html">&lt;&lt;&nbsp;RedHat Linux 上的 Python </a></td>
            <td width="30%" align="center"><br>&nbsp;<span class="divider">|</span>&nbsp;<a href="index.html#install.choosing" title="1.1.&nbsp;哪一种 Python 适合您？">1</a> <span class="divider">|</span> <a href="windows.html" title="1.2.&nbsp;Windows 上的 Python">2</a> <span class="divider">|</span> <a href="macosx.html" title="1.3.&nbsp;Mac OS X 上的 Python ">3</a> <span class="divider">|</span> <a href="macos9.html" title="1.4.&nbsp;Mac OS 9 上的 Python ">4</a> <span class="divider">|</span> <a href="redhat.html" title="1.5.&nbsp;RedHat Linux 上的 Python ">5</a> <span class="divider">|</span> <span class="thispage">6</span> <span class="divider">|</span> <a href="source.html" title="1.7.&nbsp;从源代码安装 Python ">7</a> <span class="divider">|</span> <a href="shell.html" title="1.8.&nbsp;使用 Python 的交互 Shell">8</a> <span class="divider">|</span> <a href="summary.html" title="1.9.&nbsp;小结">9</a>&nbsp;<span class="divider">|</span>&nbsp;
            </td>
            <td width="35%" align="right"><br><a class="NavigationArrow" href="source.html">从源代码安装 Python &nbsp;&gt;&gt;</a></td>
         </tr>
         <tr>
            <td colspan="3"><br></td>
         </tr>
      </table>
      <div class="Footer">
         <p class="copyright">Copyright © 2000, 2001, 2002, 2003, 2004 <a href="mailto:mark@diveintopython.org">Mark Pilgrim</a></p>
         <p class="copyright">Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007 <a href="mailto:python-cn@googlegroups.com">CPyUG (邮件列表)</a></p>
      </div>
   </body>
</html>